package gui.edit.components;

import javax.swing.DefaultListSelectionModel;

/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class DefaultListSelectionModelKeepSelected extends DefaultListSelectionModel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1329910520451061794L;
	
	public void setSelectionInterval(int index0, int index1) {
		if (isSelectedIndex(index0))
			super.removeSelectionInterval(index0, index1);
		else
			super.addSelectionInterval(index0, index1);
	}

}
